package com.weimob.mcloud.wechatwork.customer.service.user.module.bo.customer;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 客户搜索回调接口
 * Create Time: 2021年11月01日 10:36
 *
 * @author maosheng.li
 **/
@Data
public class CustomerSearchCallbackBO implements Serializable {

    private static final long serialVersionUID = -1929965164015696501L;
    private Long bosId;
    private Long sourceProductInstanceId;
    private Long sourceProductId;
    private Long wid;
    private String openId;
    private String nickname;
    private Integer gender;
    private String appId;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date corpWxLastAddTime;
    private Long corpWxFirstAddTime;
    private Integer corpWxUserNum;
    private Integer corpWxFriendNum;
    private List<CorpWxUserInfoListBean> corpWxUserInfoList;


    private String externalUserId;

    private List<String> phone;

    /**
     * 授权状态，0代表在授权范围内，1代表不在权限范围内
     */
    private Integer authorizationState;
    /**
     * 被授权的vid节点，这个是数组，同时支持数据包含查询
     */
    private List<Long> authorizeVidList;

    /**
     * 客户星级
     */
    private Integer customerRating;

    /**
     * 流程id列表
     */
    private List<String> customerProcessIdList;

    /**
     * 阶段id列表
     */
    private List<String> customerStageIdList;

    @Data
    public static class CorpWxUserInfoListBean implements Serializable{

        private static final long serialVersionUID = -4620768422386590047L;
        private String userId;
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JSONField(format="yyyy-MM-dd HH:mm:ss")
        private Date addTime;
        private Integer friended;

        /**
         * 添加方式
         * 0-未知
         * 1-扫描二维码
         * 2-搜索手机号
         * 3-名片分享
         * 4-群聊
         * 5-手机通讯录
         * 6-微信联系人
         * 7-来自微信的添加好友申请
         * 8-安装第三方应用时自动添加的客服人员
         * 9-搜索邮箱
         * 10-视频号主页添加
         * 11-内部成员共享
         * 12-管理员/负责人分配
         */
        private Integer addWay;

        private List<Integer> subAddWay;

    }
}
